
If Key_basicrom CONTAINS(basic_rev_a.rom)
	Add_CLP( /cartmapper %mapper_value% basic_rev_a.rom )
End If


If Key_pilotrom CONTAINS(yes)
	Add_CLP( /cartmapper %mapper_value% pilot.rom )
End If

If GameType CONTAINS(cas)
	If Key_basic CONTAINS(yes)
		If Key_tape CONTAINS(manual)
			Add_CLP( /nocasautoboot /basic /siopatch /type "run`c~" %gamepathfile%)

		Else
			Add_CLP( /casautoboot /basic /siopatch %gamepathfile%)

		End If



	Else
		Add_CLP( /casautoboot /siopatch /nobasic %gamepathfile%)

	End If

End If



If GameType CONTAINS(atx)
	Add_CLP( /noburstio /siopatch %gamepathfile%)
End If

If GameType CONTAINS(atr)

	Add_CLP( /siopatch /noburstio %gamepathfile%)


End If

If GameType CONTAINS(bin||rom)
	If Key_mapper CONTAINS(*)
		Add_CLP(/nobasic /cartmapper %mapper_value% %gamepathfile%)
	Else
		Add_CLP(/nobasic  %gamepathfile%)
	End If
End If

If Key_basic CONTAINS(true||on||yes||1)
	Add_CLP( /basic %gamepathfile%)
Else
	Add_CLP( /nobasic %gamepathfile%)
End If

If Key_model CONTAINS(osb)
	Add_CLP( /hardware:800 /kernel:osb /memsize:48k %gamepathfile%)

ElseIf Key_model CONTAINS(osa)
	Add_CLP( /hardware:800 /kernel:osa /memsize:48k %gamepathfile%)

ElseIf Key_model CONTAINS(XL)
	Add_CLP( /hardware:800xl /kernel:xl /memsize:64k %gamepathfile%)

Else
	Add_CLP( /hardware:800xl /kernel:xl /memsize:320k %gamepathfile%)
End If


If Key_siopatch CONTAINS(no)
	Add_CLP( /nosiopatch /noburstio %gamepathfile%)

End If

If PalNTSC = PAL
	Add_CLP( /pal)
ElseIf PalNTSC = NTSC
	Add_CLP( /ntsc)

Else
	Add_CLP( /pal)

End If


If Key_disk CONTAINS(rw)
	Add_CLP( /bootrw %gamepathfile%)
End If

If Key_autotype CONTAINS(*)
	Add_CLP( /type %autotype_value% %gamepathfile%)
End If

Run_Emulator()

